import 'package:shared_preferences/shared_preferences.dart';

class StorageUtils {
  static SharedPreferences? instance;
  static Future<SharedPreferences> getInstance() async {
    instance ??= await SharedPreferences.getInstance();
    return instance!;
  }

  static Future<bool> setString(String key, String value) async {
    var instance = await getInstance();
    return instance.setString(key, value);
  }

  static Future<String?> getString(String key) async {
    var instance = await getInstance();
    return instance.getString(key);
  }
}
